//
//  ChangePasswordTableViewCell.m
//  项目二
//
//  Created by rimi1 on 2016/11/7.
//  Copyright © 2016年 Wangxingqian. All rights reserved.
//

#import "ChangePasswordTableViewCell.h"

static NSInteger spacing_ = 20;

@implementation ChangePasswordTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self addSubview:self.title];
        [self addSubview:self.textField];
    }
    return self;
}

#pragma mark - get

- (UILabel *)title {
    
    if (!_title) {
        
        _title = [[UILabel alloc] initWithFrame:WXQRectAll(spacing_ * 0.75, spacing_, 80, WXQAdaptionHeight(16))];
        _title.font = WXQSystemFont(16);
        
    }
    return _title;
}

- (UITextField *)textField {
    
    if (!_textField) {
        
        _textField = [[UITextField alloc] initWithFrame:CGRectMake(CGRectGetMaxX(self.title.frame), CGRectGetMinY(self.title.frame), kWIDTH - CGRectGetMaxX(self.title.frame) - WXQAdaptionWidth(spacing_/2), CGRectGetHeight(self.title.bounds))];
        _textField.secureTextEntry = YES;
        _textField.keyboardType = UIKeyboardTypeASCIICapable;
        
    }
    return _textField;
}

@end
















